package br.com.dufs.mvc.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fscoreunipe.app.infra.annotations.Create_AT;

/**
 * entidade relacionada com DadosUPFDAO
 */
@Create_AT
@Entity
@Table(name = "TERRAS")
public class Terras implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id_terra")
	private Integer idTerra;
	@Column
	private String nome;
	@Column
	private double area;
	@Column(name = "vlr_uni")
	private double vlrUni;
	@Column
	private double valor;
	@Column
	private double porcent;
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "id_dadosUPF")
	private DadosDaUPF dadosUPF;

	public Terras(Integer idTerra) {
		super();
		this.idTerra = idTerra;
	}

	public Terras() {
		super();
	}

	public Integer getIdTerra() {
		return idTerra;
	}

	public void setIdTerra(Integer idTerra) {
		this.idTerra = idTerra;
	}

	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public double getArea() {
		return area;
	}

	public void setArea(double area) {
		this.area = area;
	}

	public double getVlrUni() {
		return vlrUni;
	}

	public void setVlrUni(double vlrUni) {
		this.vlrUni = vlrUni;
	}

	public double getValor() {
		return valor;
	}

	public void setValor(double valor) {
		this.valor = valor;
	}

	public double getPorcent() {
		return porcent;
	}

	public void setPorcent(double porcent) {
		this.porcent = porcent;
	}

	public DadosDaUPF getDadosUPF() {
		return dadosUPF;
	}

	public void setDadosUPF(DadosDaUPF dadosUPF) {
		this.dadosUPF = dadosUPF;
	}

}
